<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">

    </div>
    <script src="vue.js"></script>
    <script src="my-vuex.js"></script>
    <script>
      const INCREMENT = 'increment'
      const store = new Vuex.Store({
        state:{count:0},
        mutations:{
          [INCREMENT](state,payload){
            state.count+=payload.amount;
          }
        }
      });
      console.log(store.state.count);
      store.commit('increment',{amount:5});
      store.commit({type:'increment',amount:5});
      console.log(store.state.count);
    </script>
  </body>
</html>
